﻿using CalligraphyEditor.CalligraphyData;
using CalligraphyEditor.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace CalligraphyEditor
{
    /// <summary>
    /// Interaction logic for DevPaperPhotos.xaml
    /// </summary>
    public partial class DevPaperPhotos : Page, IPage
    {
        VMPaperPhotos _vm;

        public DevPaperPhotos(T_StelePaper stelePaper)
        {
            _vm = new VMPaperPhotos(stelePaper);
            InitializeComponent();
            Gcl_PaperPhotos.DataContext = _vm.Cvs;
        }

        public bool Editable
        {
            get { return true; }
        }

        public string Path
        {
            get { return string.Empty; }
        }

        public void Add()
        {
            _vm.Upload();
        }

        public void Delete()
        {
            _vm.Delete();
        }

        public void Save()
        {
            throw new NotImplementedException();
        }

        public event EventHandler<NavigateToPageEventArgs> NavigateToPage;
    }
}
